<template>
  <ArtListCart :ratRecList="ratRecList"></ArtListCart>
</template>

<script lang="ts">
import {defineComponent, ref} from "vue";
import {useRoute} from "vue-router";
import request from "@/utils/request";
import ArtListCart from "../../../components/ArtListCart.vue"

export default defineComponent({
  name: "ArtList",
  props:[
  ],
  setup(){
    const route = useRoute()
    const artCat_id = ref(route.params.artCat_id)
    let ratRecList = ref({})
    const getRec = () => {
      request.post("catArt",{c_id:artCat_id.value}).then((res:any)=>{
        if (res.code == 200) {
          ratRecList.value = res.data
        }
      })
    }
    return{
      artCat_id,
      ArtListCart,
      ratRecList,
      getRec
    }
  },
  beforeCreate() {
    this.getRec()
  }
})
</script>

<style scoped>

</style>